local style = ToEnumShortString(GAMESTATE:GetCurrentStyle():GetStyleType());
local t = Def.ActorFrame{

		--Need horizalign,right so no actorframe :(
		LoadActor("playerCircle")..{
			InitCommand=cmd(visible,GAMESTATE:IsSideJoined(PLAYER_1);xy,SCREEN_CENTER_X,60;zoom,1.4;halign,.5;valign,.49;addx,-404;addy,40;);
			OnCommand=cmd(spin;effectmagnitude,0,0,50);
		};

		LoadActor("clockCircle1")..{
			InitCommand=cmd(xy,SCREEN_CENTER_X,40;zoom,1.4;diffuse,color(".8,.8,.8,1"));
			OnCommand=cmd(queuecommand,"Anim");
			AnimCommand=cmd(sleep,10;accelerate,1;addrotationz,45);
		};
		LoadActor("playerCircle")..{
			InitCommand=cmd(visible,GAMESTATE:IsSideJoined(PLAYER_2);xy,SCREEN_CENTER_X,60;zoom,1.4;halign,.5;valign,.49;addx,404;addy,40;);
			OnCommand=cmd(spin;effectmagnitude,0,0,-50);
		};

		LoadFont("_timer numbers")..{
			Text="99";
			InitCommand=cmd(xy,SCREEN_CENTER_X,35;zoom,1.5;);
		};
		
}

	-- Draworder doesn't work on the quad lifebar so I have to do this
	-- bullshit to get the face below the lifebar
if GAMESTATE:IsSideJoined(PLAYER_1) or _G.CurrentFakeCourse then
	t[#t+1] = LoadActor("face/"..MBSTATE:GetCharacter(PLAYER_1).."_0")..{
		InitCommand=cmd(xy,SCREEN_CENTER_X,60;horizalign,right;zoom,1.5;addx,-97;addy,8;fadeleft,.1);
	};
end
if GAMESTATE:IsSideJoined(PLAYER_2) or _G.CurrentFakeCourse then
	t[#t+1] = LoadActor("face/"..MBSTATE:GetCharacter(PLAYER_2).."_1")..{
		InitCommand=cmd(xy,SCREEN_CENTER_X,60;horizalign,left;zoom,1.5;addx,97;addy,8;faderight,.1);
	};
end
	
t[#t+1] = Def.ActorFrame{
		LoadActor("lifebar_frame")..{
			InitCommand=cmd(draworder,0;xy,SCREEN_CENTER_X,60;horizalign,right;zoom,1.5);
		};
		LoadActor("lifebar_frame")..{
			InitCommand=cmd(draworder,0;xy,SCREEN_CENTER_X,60;horizalign,right;zoom,1.5;rotationy,180);
		};
}

if GAMESTATE:IsSideJoined(PLAYER_1) then
	t[#t+1] = Def.ActorFrame{
		
		LoadFont("ScreenGameplay Scoreboard")..{
			Text="1P SCORE  0123456789";
			InitCommand=cmd(xy,SCREEN_CENTER_X,13;addx,-90;horizalign,right;shadowcolor,color("0,0,0,1");shadowlengthx,2;shadowlengthy,2);
			--[[ScoreChangedMessageCommand=function(self, param)
				if param.PlayerNumber == PLAYER_1 then
					self:settext(
			]]
			ComboChangedMessageCommand=function(self)
				local PSS = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_1);
				self:settext(PSS:GetScore());
			end;
		};
		


		LoadActor("Lifebar_actor", PLAYER_1)..{
			InitCommand=cmd(draworder,2;xy,SCREEN_CENTER_X,60;addx,-230;addy,-21);
		};
		
		LoadActor(THEME:GetPathG("","DifficultyIcons"))..{
			InitCommand=cmd(animate,false;xy,SCREEN_CENTER_X-404,99;zoom,1.5;setstate,Enum.Reverse(Difficulty)[GAMESTATE:GetCurrentSteps(PLAYER_1):GetDifficulty()]);
		};
	};
end;

if GAMESTATE:IsSideJoined(PLAYER_2) then
	t[#t+1] = Def.ActorFrame{	--Player 2
		
		LoadActor("Lifebar_actor", PLAYER_2)..{
			InitCommand=cmd(rotationy,180;xy,SCREEN_CENTER_X,60;addx,230;addy,-21);
		};
		LoadActor(THEME:GetPathG("","DifficultyIcons"))..{
			InitCommand=cmd(animate,false;xy,SCREEN_CENTER_X+404,99;zoom,1.5;setstate,Enum.Reverse(Difficulty)[GAMESTATE:GetCurrentSteps(PLAYER_2):GetDifficulty()]);
		};
		
			LoadFont("ScreenGameplay Scoreboard")..{
			Text="2P SCORE  0123456789";
			InitCommand=cmd(xy,SCREEN_CENTER_X,13;addx,90;horizalign,left;shadowcolor,color("0,0,0,1");shadowlengthx,2;shadowlengthy,2);
			--[[ScoreChangedMessageCommand=function(self, param)
				if param.PlayerNumber == PLAYER_1 then
					self:settext(
			]]
			ComboChangedMessageCommand=function(self)
				local PSS = STATSMAN:GetCurStageStats():GetPlayerStageStats(PLAYER_2);
				self:settext(PSS:GetScore());
			end;
		};
	};
end;

t[#t+1] = Def.ActorFrame{
	LoadActor("footer")..{
		InitCommand=cmd(vertalign,bottom;horizalign,right;xy,SCREEN_CENTER_X-100,SCREEN_BOTTOM);
	};
	LoadActor("footer")..{
		InitCommand=cmd(vertalign,bottom;horizalign,right;xy,SCREEN_CENTER_X+100,SCREEN_BOTTOM;rotationy,180;);
	};
};

return t;